import Taro, { Component } from '@tarojs/taro';
import { View, ScrollView, Image, Text } from '@tarojs/components';
import { DNavBar } from '@/components';
import { AtList,AtListItem } from 'taro-ui'
import http from '@/api'
import './info.scss'
export default class InventoryManage extends Component {
  state = {
    titleIcon: require('@/assets/images/inventory_icon.png'),
    rightArrowIcon: require('@/assets/images/right_arrow_icon.png'),
    list: [
      {name:'历史数据统计',url:'',icon:'info0'},
      {name:'全部汇总',url:'allStatics',icon:'info1'},
      {name:'车商汇总',url:'carshopAll',icon:'info2'},
      {name:'历史订单查询',url:'',icon:'info0'},
      {name:'垫资及盘库',url:'index',icon:'info3'},
      { name: '按揭订单', url:'mortgage',icon:'info4'}
    ],
    tabIndex: 2,
    totalPage: 0,
    form: {
      page: 1,
      limit: 10
    },
    inputVal: ''
  }
  componentDidShow() {

  }
 
  handleItemClick = (item) => {
    if(item.url!==''&&item.url){
		Taro.navigateTo({ url: '/pages/historyOrder/' + item.url})
	}
  }
 

  render() {
    const { tabs, list, tabIndex, titleIcon, rightArrowIcon, searchVal } = this.state;

    return (
      <View className="info">
        <DNavBar title="数据统计"></DNavBar>

       
              <View className="info-item info-item--style" >
                <AtList hasBorder={false}>
				  {list.map((item,i)=>(<AtListItem
				     title={item.name}
					 onClick={() => this.handleItemClick(item)}
				  	 className={{ListItemBg:i==0||i==3}}
				      thumb={require('../assets/historyOrder/'+item.icon+'.png')}
				  			  
				  	/>))} 
				 
				</AtList>
				
              </View>
      </View>
    )
  }
}
